<template>
  <div id="app">
    <meting-js v-if="isMusic" server="netease" type="playlist" id="8107149360" fixed="true" autoplay="false" loop="all" order="list"
      preload="auto" list-folded="true" list-max-height="500px" lrc-type="1">
    </meting-js>
    <Header></Header>
   <router-view :key="$route.fullPath"></router-view>
    <Footer></Footer>
  </div>
</template>
<script>``
import Header from './components/Header'
import Footer from './components/Footer'
// import {startSakura, stopp} from '@/utils/fullPageSakura'
export default {
  name: 'App',
  mounted() {
    //获取网站配置信息
    // this.getSiteConfig();
    //樱花特效
    // stopp();
    // this.showSakura();
  },
  components: {
    Header,
    Footer,
  },
  computed:{
    // isMusic(){
    //     return this.$store.state.site.site.siteConfig.isMusic || undefined;
    // }, 
  },
  methods:{
    async getSiteConfig(){
      try {
        //获取网站配置信息，
        await this.$store.dispatch('site/getSite');
        const configString = JSON.stringify(this.$store.state.site.site.carouselList);
        // 将 JSON 字符串存储在 sessionStorage 中
        sessionStorage.setItem('carouselList', configString);
      } catch (error) {
        this.$message({
          type:'error',
          message:'获取网站配置信息失败'
        })
      }
    },
  }
}
</script>

<style>

</style>
